﻿using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Hosting;
using RuanMou.Projects.SeckillServices.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace RuanMou.Projects.SeckillServices.Caches
{
    /// <summary>
    /// 后台更新Redis缓存
    /// </summary>
    public class ProductCacheRedisIHostedService : IHostedService
    {
        private readonly IDistributedCache distributedCache;// 分布式缓存
        private readonly ISeckillService seckillService; // 商品Service
        public ProductCacheRedisIHostedService(IDistributedCache distributedCache, ISeckillService seckillService)
        {
            this.distributedCache = distributedCache;
            this.seckillService = seckillService;
        }

        public Task StartAsync(CancellationToken cancellationToken)
        {
            throw new NotImplementedException();
        }

        public Task StopAsync(CancellationToken cancellationToken)
        {
            throw new NotImplementedException();
        }
    }
}
